package test.san.baseproject.ui.activity

import android.view.View
import androidx.core.view.ViewCompat
import androidx.core.view.ViewPropertyAnimatorListener
import kotlinx.android.synthetic.main.activity_splash.*
import test.san.baseproject.R
import test.san.baseproject.base.BaseAvtivity

class SplashActivity: BaseAvtivity(), ViewPropertyAnimatorListener {
    override fun onAnimationEnd(view: View?) {
        startActivityFinish<MainActivity>()
    }

    override fun onAnimationCancel(view: View?) {

    }

    override fun onAnimationStart(view: View?) {

    }

    override fun getLayoutId(): Int {
        return R.layout.activity_splash
    }

    override fun initData() {
        ViewCompat.animate(splash_image).scaleX(1f).scaleY(1f).setListener(this).setDuration(1500.toLong())
    }
}